How do you instantiate a Toolbar in code?

Yes. Thank you. I’m fully aware of what Active Record is and it is a great idea for an environment such as PHP where you might use MVC… but Xojo wasn’t built that way. We shouldn’t have to use AR in Xojo. Why would I go and type all my field names a second time into a class that describes my object? The window itself should do that. It has a text field for each property into which I can add validation, store the value, and until recently… bind it to a column in a database.

Sounds like what you want is “Filemaker with more low level coding capability”
Or Access

[quote=440859:@Norman Palardy]Sounds like what you want is “Filemaker with more low level coding capability”
Or Access[/quote]

Was that not the original vision of Realbasic?

“Programming for the rest of us”

I did it for my apps, making a database editor app, that copies windows items from the database definition, and paste it in the xojo ide. took me some time to build it, but now it works fine and gives me a lot of flexibility in programming database windows.

[quote=440860:@Kristin Green]Was that not the original vision of Realbasic?
“Programming for the rest of us”[/quote]

In many ways I would say it is true - just not in the way you’re imagining
Its not writing C/C++/Obj-C/Java which IS the norm

I have literally been using it since before version 1.0 shipped in 1998 and I dont recall it ever having been presented or promoted as what you envision which seems more like Filemaker/Access but with a lot lower level coding ability when needed

Thats not to say it couldnt have components that make that kind of work easier.
Just that they dont

From the User Guide

[quote=0]Welcome to Xojo, the easiest tool for creating your own apps. Xojo is made up of a rich set of graphical user interface objects, a modern object-oriented language, an integrated debugger, and a multi-platform compiler. Together they make up the Xojo Integrated Development Environment or IDE.

With the IDE, you can build your app’s interface simply by dragging and dropping interface objects onto the apps’s windows and dialogs. In this QuickStart, you will see how easy it is. Xojo provides you with all the tools you need to build virtually any app you can imagine.[/quote]

You’ll have to forgive me if I imagined an app more complex than Eddie’s Electronics.

“build the interface” - not “build your app”

Maybe that should say “layout your interface” instead of “build your interface” so you dont get fooled into thinking that building the interface IS how you build the entire app

Xojo is not a zero-code tool
Never has been and has never been sold as such

Its just not Xcode, interface builder etc

FWIW the IDE is built using Xojo

I never expected zero code but is it not the goal of a ‘RAD’ application to reduce the amount of code necessary? Xojo’s own website claims to have Native Controls that allow you to quickly build your interface. Isn’t a date picker part of the interface?

I remember that one of the big complaints about RB from VB users was the lack of available controls and pre-built code compared to what they were used to. At the time, I assumed that RB would eventually catch up but it’s been 20 years and we still only have TextField and PasswordField.

Far be it for me to say what Xojo should be or shouldn’t be but as an ex-FMP developer and someone who has struggled to master Xojo over the years, if the goal is to provide RAD to casual programmers, yeah… we could do with a bit more FileMaker.

I might be missing something obvious has I’ve not read every word of this thread, but why don’t you have a container control for each “table view” then just use embedwithin to dynamically pull in the container relating to the table you’re currently viewing? You can then have your primary window with your toolbar and your containers with have the logic for each “view” and with a simple bit of code to dynamically alter the toolbar buttons relating to each container?

I’m the wrong person to ask
I dont work there or speak for them

You should address this to @Geoff Perlman

I had considered this. I’m not saying ‘no’… I just wish that I had a RAD tool that didn’t make me jump through such hoops.

Thanks for the input. It is appreciated.

I’ve been part of the community for close to 18 years. There are two controls that practically everyone wants day one: Date Picker and a Grid Control. For the former I’d recommend going to Einhugur. For the latter I’d recommend using the PiDog DataView control (to be fair, the Listbox is quite powerful but it’s not out-of-the-box powerful.

It is sad that these controls are not part of Xojo since, as you said, Xojo’s website claims to have native controls to quickly build your interface. I wonder how many developers skip Xojo because it doesn’t have a native Date or Grid control?

Kristin, no offense, but you seem to be mentally pretty rigid about what you expect Xojo to be.

Since I started back in 1982, I programmed in several languages, and each of them have limitations.

Right now, I use another language than Xojo to develop an Android app. There are limitations to it, but instead of blaming the conception, I use imagination and try to make due.

About imagination, precisely, just run the attached project. It should satisfy what you were after. On Mac, it adds a toolbar dynamically very nicely.

DynamicToolbar.xojo_binary_project

No offence taken, sir. I’m not sure that ‘rigid’ is the correct term though. I have certain expectations about what Xojo is supposed to be based on the marketing… but perhaps I’m wrong about that and I need to reset my expectations?

Expectations lead to disappointment. Disappointment leads to anger. Anger leads you to the Dark Side …

:wink:

[quote=440888:@Kristin Green]I had considered this. I’m not saying ‘no’… I just wish that I had a RAD tool that didn’t make me jump through such hoops.

Thanks for the input. It is appreciated.[/quote]

Out of interest how many other RAD tools have you used to build full blown application? Every RAD tool I have ever used had one thing in common - they do not allow you to do things your way! You need to follow the philosophy of the tool to be successful.

In an app I’m working on at present I have around 10 different container controls that are used to edit and display data from about 300 tables. They interact with the main window via a set of events and a common interface. Events are used to get the main window to enable buttons on the toolbar for importing or exporting data etc and the main window calls methods on the common interface to cause the container to refresh the data and so on. I understand this is a common approach in XOJO to do solve this problem.

At the end of the day you will have to decide if you are going to go with the philosophy of the RAD tool you select, XOJO or something else, or opt for an all purpose language and acceptance the associated drop in productivity.

I could not agree more! Perhaps I misunderstood what the Xojo philosophy was?

Yes it does! I never considered putting it within a ContainerControl like that but you are correct, it can now be instantiated via code… however, I still can’t seem to interact with it. For example, if you add a second button that enables one of the buttons in the toolbar, the IDE complains and says that the object does not exist… which is true as it won’t exist until runtime. Unless I’m doing something wrong, I don’t think this is the answer I was looking for.

I’m new to ContainerControls but I’ll give this a shot. Thanks!