[BEHAVIOR] Datalist for Textbox

Post your completed addons to share with the community

Post » Tue Mar 26, 2013 7:56 pm


Datalist
for Textbox
Version: 1.01 (10/04/2013)

Download Datalist.zip


For @eski
(his request)
Provide an auto-completion option to the C2 natives textboxes.

How to - This is a behavior from a former plugin I did. Just add this behavior to a textbox, and set the words list you need to use with auto-completion (in the behavior properties or by actions).

Because I transformed the plugin into a behavior, let me know if you need the archive file of the original plugin. Also, let me know if you find any bugs, or need sth else.
Thankssepteven2013-04-10 19:18:49
B
44
S
12
G
13
Posts: 628
Reputation: 10,471

Post » Wed Mar 27, 2013 3:50 am

Hey that's great!
Maybe it would be slightly more straightforward with as a "datalist textbox" object directly, with the additional parameter?

In my case, I have a list of about 200 000 items, so I would need a way to make ajax requests I guess, but the plugin is neat already for small lists

(If you're interested, it's an ini file over here, to which I'm making php requests like this for the moment - it's not really important that I add the feature, I suppose it would need advanced server side scripting too)
B
20
S
5
G
8
Posts: 325
Reputation: 6,473

Post » Wed Mar 27, 2013 7:42 am

@lemo
Yes but ashley asked to developers to not make plugins addons of official plugins.
About Ajax, I guess you can use it with this plugin.
B
44
S
12
G
13
Posts: 628
Reputation: 10,471

Post » Thu Mar 28, 2013 1:55 am

@septeven Ah, I see
Maybe it would make sense as a behavior then? (people would just apply it instead of that manual linking)
For example like the behavior by rexrainbow for text scrolling(I haven't tried it tho)
B
20
S
5
G
8
Posts: 325
Reputation: 6,473

Post » Thu Mar 28, 2013 6:24 am

@lemo
Yes iI thought about this but I never made any behavior - I should take a look.
B
44
S
12
G
13
Posts: 628
Reputation: 10,471

Post » Thu Mar 28, 2013 7:00 am

@septeven

Using "this.inst" to get the reference of main object in behavior.
Then use this reference at "apply"(or "call") with action.
For example,
https://github.com/rexrainbow/C2_plugins/blob/master/behaviors/rex_text_typing/runtime.js#L88
[code]cr.plugins_.Text.prototype.acts.SetText.apply(this.inst, [param]);[/code]
rexrainbow2013-03-28 07:00:50
B
97
S
22
G
179
Posts: 4,125
Reputation: 104,557

Post » Mon Apr 01, 2013 4:37 pm

Thanks @rexrainbow
I transformed the plugin into a behavior.

rexrainbow, do you know how to wait for the complete loading of this.inst.elem though ?
B
44
S
12
G
13
Posts: 628
Reputation: 10,471

Post » Mon Apr 01, 2013 4:54 pm

Sorry, I don't know. I guess there might be a callback for this event.
@Pode might know the answer.
B
97
S
22
G
179
Posts: 4,125
Reputation: 104,557

Post » Mon Apr 01, 2013 6:27 pm

OK thanks, maybe @Ashley will know as well ?
B
44
S
12
G
13
Posts: 628
Reputation: 10,471

Post » Mon Apr 01, 2013 8:42 pm

Good job on the behaviorization :]
B
20
S
5
G
8
Posts: 325
Reputation: 6,473

Next

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 2 guests