Search found 549 matches
- Wed Jul 30, 2025 2:40 pm
- Forum: Coding Questions
- Topic: GetExtensionPart fails with a space
- Replies: 16
- Views: 273
Re: GetExtensionPart fails with a space
Procedure.s MyGetExtensionPart3(*p)
*str.string = @*p
length = StringByteLength(*str\s)
*char.character = *p +length
Repeat
*char -SizeOf(character)
If *char\c = 46
*char +SizeOf(character)
*str = @*char
ProcedureReturn *str\s
EndIf
Until *char = *str ...
- Sat Jul 12, 2025 1:07 am
- Forum: Coding Questions
- Topic: Order of JSON items
- Replies: 9
- Views: 482
Re: Order of JSON items
Hello Sergey,
your example does not work in my case.
I want to get the name in the same order as it is written, but I get Tom, Michel, Peter.
Global NewList packages.s()
Declare findUser(JSONValue, getMembers=#NO)
Procedure.i findUser(JSONValue, getMembers=#NO)
Protected key$
Select ...
your example does not work in my case.
I want to get the name in the same order as it is written, but I get Tom, Michel, Peter.
Global NewList packages.s()
Declare findUser(JSONValue, getMembers=#NO)
Procedure.i findUser(JSONValue, getMembers=#NO)
Protected key$
Select ...
- Fri Jul 11, 2025 10:01 am
- Forum: Coding Questions
- Topic: Order of JSON items
- Replies: 9
- Views: 482
Re: Order of JSON items
Sounds good, but how can I get the address of the object if I use NextJSONMember() ?Sergey wrote: Thu Jul 10, 2025 7:09 pm I'm used a pointer to json object in memory (from min to max), maybe this help you order json members![]()
- Tue Jul 08, 2025 2:45 pm
- Forum: Coding Questions
- Topic: Order of JSON items
- Replies: 9
- Views: 482
Order of JSON items
Why is the order of the items in this example different from the order I see in a text editor?
Global NewList packages.s()
Declare findIsMandatory(JSONValue, getMembers=#NO)
Procedure.i findIsMandatory(JSONValue, getMembers=#NO)
Protected key$
Select JSONType(JSONValue)
Case #PB_JSON ...
Global NewList packages.s()
Declare findIsMandatory(JSONValue, getMembers=#NO)
Procedure.i findIsMandatory(JSONValue, getMembers=#NO)
Protected key$
Select JSONType(JSONValue)
Case #PB_JSON ...
- Mon Jun 23, 2025 9:39 pm
- Forum: Mac OSX
- Topic: ListIconGadget with Icon and Text example
- Replies: 0
- Views: 108
ListIconGadget with Icon and Text example
Here is an example of a ListIconGadget under macOS with icons with variable size.
Unfortunately, the constrain does not work as it should or as I expect it to. If anyone has a suggestion for improvement, please post it.
Global mainWindow, NSTableView
CreateImage(0, 32, 32, 32, $FF0000 ...
Unfortunately, the constrain does not work as it should or as I expect it to. If anyone has a suggestion for improvement, please post it.
Global mainWindow, NSTableView
CreateImage(0, 32, 32, 32, $FF0000 ...
- Thu Jun 19, 2025 11:45 am
- Forum: Mac OSX
- Topic: Cocoa: How to feed an OutlineView Programatically
- Replies: 6
- Views: 2816
Re: Cocoa: How to feed an OutlineView Programatically
I guess that's the right...
Global RootNode = CocoaMessage(0, 0, "NSTreeNode treeNodeWithRepresentedObject:$", @"Root node")
CocoaMessage(0, RootNode, "retain")
ChildNode1 = CocoaMessage(0, 0, "NSTreeNode treeNodeWithRepresentedObject:$", @"Child node 1")
ChildNode2 = CocoaMessage(0, 0 ...
Global RootNode = CocoaMessage(0, 0, "NSTreeNode treeNodeWithRepresentedObject:$", @"Root node")
CocoaMessage(0, RootNode, "retain")
ChildNode1 = CocoaMessage(0, 0, "NSTreeNode treeNodeWithRepresentedObject:$", @"Child node 1")
ChildNode2 = CocoaMessage(0, 0 ...
- Thu Jun 19, 2025 8:34 am
- Forum: Mac OSX
- Topic: Cocoa: How to feed an OutlineView Programatically
- Replies: 6
- Views: 2816
Re: Cocoa: How to feed an OutlineView Programatically
Unfortunately I get an error "[ERROR] Illegal instruction. (executing binary Data?)" on line 43.
Can someone explain me why?
Code: Select all
ProcedureReturn CocoaMessage(0, item, "representedObject") ;<-- hier it crashes
- Tue Jun 17, 2025 8:26 am
- Forum: Mac OSX
- Topic: How can I unfold a TreeGadget?
- Replies: 8
- Views: 338
Re: How can I unfold a TreeGadget?
Here is what I was looking for...
Code: Select all
CocoaMessage(0, GadgetID(tree), "expandItem:", #nil, "expandChildren:", #YES)
- Mon Jun 16, 2025 7:39 pm
- Forum: Mac OSX
- Topic: How can I unfold a TreeGadget?
- Replies: 8
- Views: 338
Re: How can I unfold a TreeGadget?
No, it does not help.
If I use a shortcut (option + arrowRight) it opens in a second.
If I use a shortcut (option + arrowRight) it opens in a second.
- Sun Jun 15, 2025 5:57 pm
- Forum: Mac OSX
- Topic: How can I unfold a TreeGadget?
- Replies: 8
- Views: 338
Re: How can I unfold a TreeGadget?
Thanks!
This is ok for a few hundert items, but on 7000 items it takes 40 seconds to open them.
I hope there is a better way.
This is ok for a few hundert items, but on 7000 items it takes 40 seconds to open them.
I hope there is a better way.
- Sun Jun 15, 2025 10:27 am
- Forum: Mac OSX
- Topic: How can I unfold a TreeGadget?
- Replies: 8
- Views: 338
How can I unfold a TreeGadget?
How can I unfold all nodes of a TreeGadget?
- Thu May 29, 2025 5:33 pm
- Forum: Mac OSX
- Topic: missing my App in recent Apps in Dock
- Replies: 3
- Views: 1622
Re: missing my App in recent Apps in Dock
I'm not sure if we talk about the same behaviour.
In the Dock, on the right side are the tree last recent / suggested apps listed after they quit.
My apps are not in this list after they quit.
Can someone tell me why?
In the Dock, on the right side are the tree last recent / suggested apps listed after they quit.
My apps are not in this list after they quit.
Can someone tell me why?
- Mon May 05, 2025 5:33 pm
- Forum: Coding Questions
- Topic: Problem with List [ AddElement( *dev\phoneNo() ) ]
- Replies: 1
- Views: 240
Problem with List [ AddElement( *dev\phoneNo() ) ]
How can I add an element to list inside a structure which is represented by a pointer?
Structure personsStruc
firstName.s
lastName.s
List phoneNo.s()
EndStructure
dev.personsStruc
dev\firstName= "Bill"
Debug dev\firstName
*p = @dev\firstName
*dev.personsStruc = @*p
Debug *dev\firstName ...
Structure personsStruc
firstName.s
lastName.s
List phoneNo.s()
EndStructure
dev.personsStruc
dev\firstName= "Bill"
Debug dev\firstName
*p = @dev\firstName
*dev.personsStruc = @*p
Debug *dev\firstName ...
- Thu May 01, 2025 9:31 am
- Forum: Tricks 'n' Tips
- Topic: Select folder dialog
- Replies: 9
- Views: 5293
Re: Select folder dialog
How can I use the SetCancelButtonLabel() Methode?
- Mon Feb 17, 2025 5:43 pm
- Forum: Assembly and C Programming in PureBasic
- Topic: Error read() on macOS arm64
- Replies: 7
- Views: 3279
Re: Error read() on macOS arm64
This example works
ImportC ""
_read_(port, *read_buf, size)
EndImport
read_(port, *read_buf, size)
But how can use the C code to include th .h file?
This example does not work on my ARM Mac and why does the C function red() works without including on my Intel Mac ?
! #include <unistd.h ...
ImportC ""
_read_(port, *read_buf, size)
EndImport
read_(port, *read_buf, size)
But how can use the C code to include th .h file?
This example does not work on my ARM Mac and why does the C function red() works without including on my Intel Mac ?
! #include <unistd.h ...