Control sets for web 2.0, any news?

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…

Please hurry, get them back. I need them.

1 Like

I know we were told the plan was to bring them back. This is the only feedback ticket I could find on the matter: feedback://showreport?report_id=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.

3 Likes

I’d love to see this feature come back.

We need it for the day when we convert some Web 1 projects to Web 2.

1 Like

Yes, we offer Tech Support - you can reach them here: Xojo: Contact Xojo

2 Likes

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

But isn’t it much easier with :

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…

3 Likes

Here is a way to have common events for a series of controls:

  1. Drag a webcontrol over “Contents”. It will create a “customWebButton” for instance
  2. Add events to that control
  3. Drag as many instances as you want of that custom control onto a webpage

Hello, I can’t reproduce it, is there any example?

This is much nicer, not having to write some code in the custom controls, like a ID for using it later.

Well that already generated it, but how do I get to go through a FOR to pass to each control a value depending on the index?

You can create an array of for instance Weblabel, which has an index, and assign each member to it.

Then you can do something like

myLabelsArray(1).text = "testing"
1 Like

@Michel_Bujardet

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.

Solved creating a property with the object that you want and there if the property is handled like an Array.

Thanks to all!

Well, if we look into the recent history, promised features coult take several years so… Dont hold your breath.

Meanwile if you really want go web 2.0 your best bet is the hacks and work arounds to overcome the lack of included functionality

2 Likes

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 ?

cheers Helge

Here is a small project showing how to create a do it yourself control set.

  1. Drag a control onto the “Contents” label in the left panne.
  2. That will create in this project “CustomWebButton”. Works for all webcontrols.
  3. Add the property Ndex as Integer to it.
  4. Right click on the custom webcontrol, and select “Inspector behavior”
  5. Make sure NDex is ticked, so it will showup in the inspector
  6. Add the Pressed event handler (or others) to CustomWebButton
  7. 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.

Enjoy :slight_smile:

DIYcontrolset project

2 Likes

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…

Yep, the grouping is important for a tidy workflow… and also it is very quick and easy to use it…

and also, going from desktop to web, will be easier if we have control sets in web2.0 as well, since it is already in desktop.

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

Captura de Pantalla 2021-09-10 a la(s) 12.01.30

The problem is that I had to create it at run time and set up the distribution that I needed.

Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.