Search found 42 matches

by simberr
Wed Oct 17, 2018 5:08 pm
Forum: Mac OSX
Topic: Drop Shadow in Canvas Gadget
Replies: 3
Views: 1915

Re: Drop Shadow in Canvas Gadget

Wilbert

Yet again, you have provided the perfect example and answer to my question. Thank you.

I am new to PB and really exploring the software. I am a Xojo user and about to decide to drop Xojo altogether in favour of PB.

I have created a significant number of objects that I use in my Xojo apps ...
by simberr
Wed Oct 17, 2018 2:27 pm
Forum: Mac OSX
Topic: Drop Shadow in Canvas Gadget
Replies: 3
Views: 1915

Drop Shadow in Canvas Gadget

I would really like to use the OSX Dropshadow availability within the canvas gadgets and have no real idea how to code this in PB.

Can someone provide me with the cocoa calls to undertake this facility?

Thanks in advance.
by simberr
Tue Sep 11, 2018 1:49 pm
Forum: Mac OSX
Topic: Setting Vertical Alignment in ListIconGadget
Replies: 2
Views: 1782

Re: Setting Vertical Alignment in ListIconGadget

Shardik

Thank you! I have been hunting for the CocoaMessage in the Apple documentation and couldn't find it!

Why are you worried about the function being acceptable to Apple? Is it already deprecated? Have they suggested an alternative?

In the meantime I will use this as it works exactly as I ...
by simberr
Sun Sep 09, 2018 1:45 pm
Forum: Mac OSX
Topic: Resizing Window
Replies: 3
Views: 2107

Re: Resizing Window

Thank you mk-soft and wilbert for your prompt answers.

In fact I have solved the problem - my issue in not understanding the flow properly and I have now solved the problem. I was trying to solve the issue within the event loop created by the form designer but, of course, that is overwritten each ...
by simberr
Sun Sep 09, 2018 1:39 pm
Forum: Mac OSX
Topic: Setting Vertical Alignment in ListIconGadget
Replies: 2
Views: 1782

Setting Vertical Alignment in ListIconGadget

I am using the Cocoa procedure in the Tips and Tricks section to set the row height of my ListIconGadget items and this works well.

However, the text is aligned to the top of the cell and does not look right. I have been attempting to find the Cocoa function to specify the Vertical Alignment of the ...
by simberr
Sat Sep 08, 2018 12:33 pm
Forum: Mac OSX
Topic: Resizing Window
Replies: 3
Views: 2107

Resizing Window

I have created a routine that enables me to reset all the column widths within a ListIconGadget.

If a window is resized then I would like to call this routine but I cannot find any way to do that. If I set the gadget to lock left, right, top and bottom then the Form Designer automatically creates a ...
by simberr
Wed Sep 05, 2018 10:28 am
Forum: Mac OSX
Topic: Crash in Dylib
Replies: 13
Views: 2717

Re: Crash in Dylib

Thank you.

I think I will go down the route of not using dylibs for any GUI part of the app. Dynamically creating the GUI from within the main app with data supplied by the dylib would seem the better option.

Thank you for your time and effort. It is really appreciated from this newcomer to PB ...
by simberr
Tue Sep 04, 2018 5:25 pm
Forum: Mac OSX
Topic: Crash in Dylib
Replies: 13
Views: 2717

Re: Crash in Dylib

I coded my dylib for the external procedures (those with ProcedureCDLL) to open and close an AutoTReleasePool. This solution now works for about 3 iterations before crashing.

The Mac report is:
Application Specific Information:
objc[34707]: Invalid or prematurely-freed autorelease pool ...
by simberr
Tue Sep 04, 2018 5:08 pm
Forum: Mac OSX
Topic: Crash in Dylib
Replies: 13
Views: 2717

Re: Crash in Dylib

If I understand you correctly I should add the before and after code you specified to every procedure that I have within my dylib?

Ok, I will try that.

I will come back with the results.

Simon.
by simberr
Tue Sep 04, 2018 1:22 am
Forum: Mac OSX
Topic: Crash in Dylib
Replies: 13
Views: 2717

Re: Crash in Dylib

I spoke too soon!

After working in a simple test I am now finding that it does not work any more. I am still running my test in the exact same place with no changes but I am still getting the crash after the first iteration.

It now makes no sense to me that implementing the code worked a hundred ...
by simberr
Mon Sep 03, 2018 2:35 pm
Forum: Mac OSX
Topic: Crash in Dylib
Replies: 13
Views: 2717

Re: Crash in Dylib

Wilbert

You are amazing!

It seems that this works. In a simple test I could call the dylib procedure on a number of occasions and they all opened and closed correctly, returning the correct values from the sent values, too.

Obviously I have to extensively test this but it seems that you have ...
by simberr
Mon Sep 03, 2018 1:39 pm
Forum: Mac OSX
Topic: Crash in Dylib
Replies: 13
Views: 2717

Re: Crash in Dylib

Wilbert

Yes, it does seem to be something to do with the autorelease pool.

Fred suggested in his post that
event = WindowEvent()
could be used to clear/reset the pool.

I have now tried this in various places but I still get the crash.

If the GUI elements are not supposed to be called/used ...
by simberr
Mon Sep 03, 2018 12:51 pm
Forum: Mac OSX
Topic: Crash in Dylib
Replies: 13
Views: 2717

Re: Crash in Dylib

I have now narrowed down the crash to a specific situation.

If I send and/or receive an integer value then no crash.
If I send and/or receive a double value then no crash.
If I send and/or receive a string value then no crash.

It is when I am asking the dylib routine to open a window within the ...
by simberr
Sat Sep 01, 2018 12:35 pm
Forum: Mac OSX
Topic: Crash in Dylib
Replies: 13
Views: 2717

Crash in Dylib

I hope that someone can point me in the right direction with a crash that I am receiving on a call to a Dylib.

I have a dylib that I created in PB. It is a simple dylib with a single exported function. The definition is:
ProcedureCDLL doTTTest()
I place the dylib in the main program's Resources ...
by simberr
Thu Aug 30, 2018 3:54 pm
Forum: Mac OSX
Topic: Dylib handling
Replies: 0
Views: 1081

Dylib handling

Is it possible to suppress creating and draining an NSAutoreleasePool when a dylib is entered?