Re: Best practice for creating a custom control
Thank you Ken for the link and the example. Yes, it helps me a lot. Jerome Le 1 nov. 2010 à 22:24, Ken Ray a écrit : I'm looking for a kind of best practice for creating custom controls. For example, how to access the data of the custom control ? Do we have to use custom properties or a setProp or getProp handlers or both ? Is it preferable to use a prefix for naming a command ? And for custom properties, do we have to use a set of properties ? With a standard name ? Etc. You might want to take a look at the budding standards document that is in development over at the revInterop user group: http://tech.groups.yahoo.com/group/revInterop/ There's a bunch of info there about naming conventions, etc. As far as accessing the data is concerned, there isn't really a best practice yet; getprop/setprop works well in *some* instances, but not in others, as does actually using custom properties. For example, I tend to use custom properties to store data relative to custom controls I've created, and only use getProp/setProp when I want to trigger some kind of visual feedback. For example, I have a custom control which is a prompt field (it's a field that shows a custom text string in gray; when the field gets the focus, the text goes away so the user can type what they want, and when the field loses the focus if there's no text in the field it shows the prompt again). To specify what text should be shown as the prompt text, I set the uSTSPromptText of the field to a value. If the field is currently showing a text prompt, I'd like to change that to the value I'm setting for uSTSPromptText, so I have a getProp handler that is triggered to make that happen. Hope this helps, Ken Ray Sons of Thunder Software, Inc. Email: k...@sonsothunder.com Web Site: http://www.sonsothunder.com/ ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Best practice for creating a custom control
I'm looking for a kind of best practice for creating custom controls. For example, how to access the data of the custom control ? Do we have to use custom properties or a setProp or getProp handlers or both ? Is it preferable to use a prefix for naming a command ? And for custom properties, do we have to use a set of properties ? With a standard name ? Etc. You might want to take a look at the budding standards document that is in development over at the revInterop user group: http://tech.groups.yahoo.com/group/revInterop/ There's a bunch of info there about naming conventions, etc. As far as accessing the data is concerned, there isn't really a best practice yet; getprop/setprop works well in *some* instances, but not in others, as does actually using custom properties. For example, I tend to use custom properties to store data relative to custom controls I've created, and only use getProp/setProp when I want to trigger some kind of visual feedback. For example, I have a custom control which is a prompt field (it's a field that shows a custom text string in gray; when the field gets the focus, the text goes away so the user can type what they want, and when the field loses the focus if there's no text in the field it shows the prompt again). To specify what text should be shown as the prompt text, I set the uSTSPromptText of the field to a value. If the field is currently showing a text prompt, I'd like to change that to the value I'm setting for uSTSPromptText, so I have a getProp handler that is triggered to make that happen. Hope this helps, Ken Ray Sons of Thunder Software, Inc. Email: k...@sonsothunder.com Web Site: http://www.sonsothunder.com/ ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Best practice for creating a custom control
Hi Mark, Thank you for the link and the example. I note that you reach the data of the field through a setProp and a get Prop handler. Best regards, Jerome Le 30 oct. 2010 à 01:28, Mark Schonewille a écrit : Hi Jerome, You might want to have a look at the scripts of the password field, available at http://qurl.tk/jo -- Best regards, Mark Schonewille Economy-x-Talk Consulting and Software Engineering Homepage: http://economy-x-talk.com Twitter: http://twitter.com/xtalkprogrammer KvK: 50277553 Download the Installer Maker plugin for Runtime Revolution at http://qurl.tk/ce Create installers for Mac and Windows on *every* Rev-compatible platform. No additional software needed. On 30 okt 2010, at 01:14, Jérôme Rosat wrote: Hello everybody, I'm looking for a kind of best practice for creating custom controls. For example, how to access the data of the custom control ? Do we have to use custom properties or a setProp or getProp handlers or both ? Is it preferable to use a prefix for naming a command ? And for custom properties, do we have to use a set of properties ? With a standard name ? Etc. Thank you for you help. Jerome ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Best practice for creating a custom control
Hello everybody, I'm looking for a kind of best practice for creating custom controls. For example, how to access the data of the custom control ? Do we have to use custom properties or a setProp or getProp handlers or both ? Is it preferable to use a prefix for naming a command ? And for custom properties, do we have to use a set of properties ? With a standard name ? Etc. Thank you for you help. Jerome ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Best practice for creating a custom control
Hi Jerome, You might want to have a look at the scripts of the password field, available at http://qurl.tk/jo -- Best regards, Mark Schonewille Economy-x-Talk Consulting and Software Engineering Homepage: http://economy-x-talk.com Twitter: http://twitter.com/xtalkprogrammer KvK: 50277553 Download the Installer Maker plugin for Runtime Revolution at http://qurl.tk/ce Create installers for Mac and Windows on *every* Rev-compatible platform. No additional software needed. On 30 okt 2010, at 01:14, Jérôme Rosat wrote: Hello everybody, I'm looking for a kind of best practice for creating custom controls. For example, how to access the data of the custom control ? Do we have to use custom properties or a setProp or getProp handlers or both ? Is it preferable to use a prefix for naming a command ? And for custom properties, do we have to use a set of properties ? With a standard name ? Etc. Thank you for you help. Jerome ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution