Search found 15 matches

by skape
Sun Feb 01, 2015 3:52 pm
Forum: Coding Questions
Topic: Pointers in Lists and Structure Parameters (from a noob)
Replies: 8
Views: 2461

Re: Pointers in Lists and Structure Parameters (from a noob)

Ehm, sorry I'm not sure anymore what "that way" is. Can you rephrase ?
Ha, yes, sorry! :)

I mean using AllocateStructure() is not a bad idea for dynamic structures, just to make sure EVERYTHING is initialized. I could see that being important for a more complex structure.
by skape
Sun Feb 01, 2015 3:42 pm
Forum: Coding Questions
Topic: Pointers in Lists and Structure Parameters (from a noob)
Replies: 8
Views: 2461

Re: Pointers in Lists and Structure Parameters (from a noob)

Thanks luis. :)

So, if I don't need my structure initialized (automatically, as I am doing it manually in my "constructor"), would it essentially be a slightly slower (but slightly shorter code) AllocateMemory(SizeOf(STRUCTURE))? Also it would have the benefit of zeroing or initializing all of the ...
by skape
Sun Feb 01, 2015 3:04 pm
Forum: Coding Questions
Topic: Pointers in Lists and Structure Parameters (from a noob)
Replies: 8
Views: 2461

Re: Pointers in Lists and Structure Parameters (from a noob)

Thank you Demivec and netmaestro! :)

Anyone have any comments on the graphics techniques (Problem 3)?

Also, what exactly is AllocateStructure()? Is it essentially AllocateMemory(SizeOf(STRUCTURE))?

Thanks for your help! :)
by skape
Sun Feb 01, 2015 7:00 am
Forum: Coding Questions
Topic: Pointers in Lists and Structure Parameters (from a noob)
Replies: 8
Views: 2461

Pointers in Lists and Structure Parameters (from a noob)

Hello,

I'm playing around with pointers, lists, and "constructing" procedures. Here is my test code:

Structure WALKER
x.f
y.f
EndStructure

Procedure Walker_new(x.f, y.f)
*w.WALKER = AllocateMemory(SizeOf(WALKER))
*w\x = x
*w\y = y
ProcedureReturn *w
EndProcedure

Procedure Walker_move(*w ...
by skape
Mon Jan 26, 2015 5:26 am
Forum: Mac OSX
Topic: Getting File Dragged to Icon
Replies: 10
Views: 4824

Re: Getting File Dragged to Icon

Alright, thanks Danilo. :)

I didn't know about the PostEvent(#CustomEvent) ability. Neat. :)
by skape
Mon Jan 26, 2015 4:35 am
Forum: Mac OSX
Topic: Getting File Dragged to Icon
Replies: 10
Views: 4824

Re: Getting File Dragged to Icon

Now I'm really befuddled. It seems to be working now for all combinations of Procedure vs. ProcedureC and PB_Gadget_SetOpenFinderFiles() before vs after OpenWindow(). Suddenly it doesn't matter...... :shock:

Maybe I'm using a slightly different plist??


As a side note: I mostly understand (some ...
by skape
Mon Jan 26, 2015 4:28 am
Forum: Mac OSX
Topic: Getting File Dragged to Icon
Replies: 10
Views: 4824

Re: Getting File Dragged to Icon

Did you try to move 'PB_Gadget_SetOpenFinderFiles' before the OpenWindow() command?

Yes, I did try that and it made no difference for me. In fact, that is what I tried first.

Shouldn't you change 'Procedure' to 'ProcedureC' for the handler callback?

Hmm, not sure about that one. Seems to work ...
by skape
Mon Jan 26, 2015 3:48 am
Forum: Mac OSX
Topic: Getting File Dragged to Icon
Replies: 10
Views: 4824

Re: Getting File Dragged to Icon

Thanks WilliamL, your reply is helpful. Seems to me that it may be a problem with Yosemite. I have tried many combinations of specific extensions and generic ones, and I replace the plist every time I compile an executable... The registering IS WORKING, just only when the app is already open.

I'm ...
by skape
Sun Jan 25, 2015 4:32 pm
Forum: Mac OSX
Topic: Getting File Dragged to Icon
Replies: 10
Views: 4824

Re: Getting File Dragged to Icon

It'd be awesome if someone could try this out. I've been bashing my head against it for the last couple of days and can't get it to register the initial event when the app is opened... Thanks!

This is pretty essential for any app that opens documents (or potentially for easy file processing w/ drag ...
by skape
Sun Jan 25, 2015 5:03 am
Forum: Announcement
Topic: SpiderBasic 1.00 is out !
Replies: 438
Views: 242629

Re: SpiderBasic 1.00 beta 2

So am I correct in assuming that the "Color" parameter of DisplayTransparentSprite() is not implemented yet? I know tinting can be tricky in HTML5...

By the way, in my tests, the performance of SpiderBasic so far has been outstanding. For a simple test with bouncing, rotating, sprites the ...
by skape
Fri Jan 23, 2015 10:02 pm
Forum: Announcement
Topic: overview of 9 sound synthesis apps in PB
Replies: 11
Views: 7008

Re: overview of 9 sound synthesis apps in PB

As someone who has always been interested in synthesis techniques, this is really fascinating to me. Good work. :)

I particularly liked the Bézier modulation sounds. Very interesting. Thanks!
by skape
Fri Jan 23, 2015 7:40 pm
Forum: Mac OSX
Topic: Getting File Dragged to Icon
Replies: 10
Views: 4824

Re: Getting File Dragged to Icon

Hi,

Thanks for your reply! I had already updated the plist with an entry that enables the dragging of any type of file:

<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>*</string>
</array>
<key>CFBundleTypeRole</key>
<string>Editor</string ...
by skape
Fri Jan 23, 2015 6:05 pm
Forum: Mac OSX
Topic: Getting File Dragged to Icon
Replies: 10
Views: 4824

Getting File Dragged to Icon

Hello,

Using the code posted by WilliamL (originally Fred) in the Cocoa tips and tricks thread, I created a test app as such:

ImportC ""
PB_Gadget_SetOpenFinderFiles(Callback)
EndImport

IsGadget(0) ; Ensures the gadget lib is linked as this command is in it

Procedure OpenFinderFilesCallback ...
by skape
Mon Nov 18, 2013 3:39 pm
Forum: Feature Requests and Wishlists
Topic: Sprite3D functions to accept floats
Replies: 18
Views: 5249

Re: Sprite3D functions to accept floats

@STARGÅTE, yep, exactly what I'm asking about. I thought that enabling bilinear filtering would do it for DisplaySprite(), but thanks for the TransformSprite() tip. :)

Too bad using RotateSprite() or ZoomSprite(), etc. resets the previous matrix transformations..

@Fred, yeah, I know you can send a ...
by skape
Mon Nov 18, 2013 8:10 am
Forum: Feature Requests and Wishlists
Topic: Sprite3D functions to accept floats
Replies: 18
Views: 5249

Re: Sprite3D functions to accept floats

Very sorry to resurrect such an old thread (I couldn't find a newer one addressing this), but has this been added / changed as of PB 5.2x? It doesn't appear to be possible in the 5.20 demo. It's something that is somewhat important to me, to be able to draw sprites at non-whole number positions for ...