[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.rar


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.
Thanks
Last edited by septeven on Tue Apr 25, 2017 2:29 pm, edited 1 time in total.
Passionate developer

If my work helped you to make your project, please consider making a donation :)
B
44
S
12
G
14
Posts: 631
Reputation: 10,987

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
21
S
6
G
8
Posts: 327
Reputation: 6,609

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.
Passionate developer

If my work helped you to make your project, please consider making a donation :)
B
44
S
12
G
14
Posts: 631
Reputation: 10,987

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
21
S
6
G
8
Posts: 327
Reputation: 6,609

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.
Passionate developer

If my work helped you to make your project, please consider making a donation :)
B
44
S
12
G
14
Posts: 631
Reputation: 10,987

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
107
S
25
G
230
Posts: 4,353
Reputation: 130,894

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 ?
Passionate developer

If my work helped you to make your project, please consider making a donation :)
B
44
S
12
G
14
Posts: 631
Reputation: 10,987

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
107
S
25
G
230
Posts: 4,353
Reputation: 130,894

Post » Mon Apr 01, 2013 6:27 pm

OK thanks, maybe @Ashley will know as well ?
Passionate developer

If my work helped you to make your project, please consider making a donation :)
B
44
S
12
G
14
Posts: 631
Reputation: 10,987

Post » Mon Apr 01, 2013 8:42 pm

Good job on the behaviorization :]
B
21
S
6
G
8
Posts: 327
Reputation: 6,609

Next

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 3 guests