Hi,all. The control sets for web was deferred. But for how long.
I’m just about to convert 3 web_1.0 projects to web2.0 but unless the control sets are back soon, I’m not shure…
The IDE is to growded with items if I can not have control - sets… I normally have 20+ text fields of input, on many differenct containers… and not having control sets add an extra complexity to the programming… With control-sets it was so easy, and the IDE was also nice and tidy when working with them…
I know we were told the plan was to bring them back. This is the only feedback ticket I could find on the matter: <https://xojo.com/issue/64653>
Staff have told us a couple of times that if there’s something very important or showstopping, you should reach out by email with the case number. Hopefully that helps.
Honestly I found control sets cumbersome and weird to use. I prefer subclassing and nesting container controls. I don’t think there’s anything fundamental that you would need control sets for that can’t be done with container controls
Drag a text field into IDE, set it to control set, duplicate up to 20. and in the left side of IDE, have only ONE line of all these 20 items, have ONE place for the CODE and use the index of each item to control what to do…
It looks much nicer, fewer items, and the code is extremely neet and tidy.
all thanks to the beatiful control sets…
Doing a convert of a desktop app to web, will certainly need this… since you have control-sets there all the time…
Excuse my English (I use translator), but how do I get from your first indication (I already have the customControl) to this last one, which is the solution.
Hi Mauricio, I don’t understand how you created that array of an object like that, with just drag/drop into the IDE… do you mind me asking if you could send me a projec file for me to look at ? PM or helgetjelta@icloud.com ?
Here is a small project showing how to create a do it yourself control set.
Drag a control onto the “Contents” label in the left panne.
That will create in this project “CustomWebButton”. Works for all webcontrols.
Add the property Ndex as Integer to it.
Right click on the custom webcontrol, and select “Inspector behavior”
Make sure NDex is ticked, so it will showup in the inspector
Add the Pressed event handler (or others) to CustomWebButton
Now you can add several instances to the webpage from the bottom of the library, in the “Project Controls” section.
8; For each instance, make sure to set the Ndex different values. It is manually what a control set would have done.
Now when you click one of the buttons, this code will show the Ndex for the pressed button in the message pane:
System.debuglog "I have Ndex " + str(me.Ndex)
This may seem long, but it is rather simple to do. You get pretty much the same features as a control set with one event handler for all instance, except you have to set the value of NDex.
Except the controls are not grouped, feature that was one of the things Helge wanted.
Except the event is not on the same parent object so you have to prepend all your code, for example, instead of writng to the log, try to add a label in the same page, you have to change all your code to:
PAGE1.Label1.Text = Ndex.Tostring
if you dont use implicit instances…
If you need more than one control set…
Create a Container with the object, and assign it an Index property.
Then where you need to batch load it, create a property with that object and that property can be defined as Array.
Var dc As New ccCocheAsiento
dc.EmbedWithin(Self, LEFT, TOP, 60, 60)
mAsientos(intINDICE) = dc
mAsientos(intINDICE).vNumero = intINDICE.ToText
The problem is that I had to create it at run time and set up the distribution that I needed.