Interface Builder

I wanted to create a XCode desktop application that use a ListBox.

Easy some will say. Just open Interface Builder and…

But “How do I open the Interface Builder” ?

Search in the Internet… Yes Man ! I’ve done that and it says to click in the Tree folder (what is that and where it is) then select Menuxxxx.nib (something like that).

The next person who told me to search in the internet will get the donkey hat !!!

Is there’s a gentle soul who can explain how to do so ? Please ?

MacBook Pro m1
MacOS 14.3
XCode 15.2

This is filed under “WINDOWS”, there is not GUI controls for WINDOWS using Xcode
If in fact you meant macOS, the are you planning on using Swift? or ObjC?

And neither has a “Listbox” defined the same as Xojo does, there is a UITableView (or NSTableView for macOS) for which you have to define the rows, columns etc. as well as a dataStore of sometype (array or DB to store the data).

So, if you are expecting to be able to just open a blank iOS or macOS project in Xcode, go to Interface Builder and drop in a Listbox the same as you would for Xojo, sorry to disappoint

I attempted to write one a few years ago, the goal was an object syntax/function/feature comparable to Xojo. It “works”, but slow, is 2000 lines of Swift and only for macOS.

The macOS table object supports multiple columns, however the iOS version does not

I seemed to have had another version that was working on iPad, (there is a post on here about it), but I cannot find the project… so I’m gonna start from scratch… for iPad and macOS both

Here’s what Google says (a minute ago, but nearly the same was said days ago):

Nearly the same as I get from Bard…

LOL… well trust me when I say GOOGLE is WRONG… An NSSCrollView is NOT a listbox… as a matter of fact it is just a container 100% identical to the Xojo iOS control “ScrollableArea”

On this subject AI isn’t very bright.

For example, POE.COM says to use a PickerView or a CollectionView. The latter of which has a better change of success.

But in no case is the a ready-made drag and drop component that is even close to this functionality

There is still more work to be done, but here is the beginning of a true Listbox (ala Xojo) for Swift
This sample is on an iPad, but the finished control will work for iOS and macOS both (same code base)

right now the main Listbox module is 1274 lines, and the Scrollbar controls are an extra 175. Although it will grow larger as more features are implemented and debugged

This does NOT use the UIScrollview (on purpose)… to make a smaller footprint, it only manages the drawing and storage of what is “visible”

While is follows the Xojo syntax in many ways it supports things the Xojo listbox does not

  1. Variable Height Rows
  2. ability to freeze the first column (ala Excel)
    yet to name two :slight_smile:

Here you go:

https://developer.apple.com/documentation/SwiftUI/Table

1 Like

well d*mn… I had never seen that…

OH! because it is SwiftUI!.. something that I am still no convinced about

And still would require a TON of work to come close to the same functionality as an Xojo Listbox, as shown it is a display datagrid… but its a start

I believe you. This is not the first time I read wrongs from google/the internet/whatever…

1 Like

Thank you all for your answers.

NB: I do not care about looks like… Bozo !
I used the word ListBox because everybody here knows what I mean. (That was what I was hoping…)

I get it. Half of my problem with Go (or any language other than Xojo) is I know what I want to do but I’m not sure what it’s called. At least with Go chatGPT is pretty good at getting me 80% there and enough of the idea/concept to run with it. Although occasionally it does some things out of left field in both good and bad ways.

1 Like

I found a video (and for once from a long time), I downloaded it and watch it, that talks about List Box…

But it was for Power.

After minutes of watching the poor quality video, I loaded the subtitles file (.srt) and read its contents…

NB: I could have named it a Grid or an Excel like Control, but … it would be misleading.

I found an answer who uses only two lines to load a text file contents and display it in a ListBox here:

Development environment is unknow.

First word of the Google question was: “java”…