[fpc-pascal] Dynamic messaging in Delphi

2012-07-24 Thread Ryan Joseph
e.DoThis (value: integer); begin writeln('did this ', value); end; var delegate: TMyDelegate; begin delegate := TMyDelegate.Create; TestDelegate(delegate); end. Regards, Ryan Joseph thealchemistguild.com __

Re: [fpc-pascal] Dynamic messaging in Delphi

2012-07-24 Thread Ryan Joseph
elegate) then >intfDelegate.DoThis Regards, Ryan Joseph thealchemistguild.com ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Dynamic messaging in Delphi

2012-07-25 Thread Ryan Joseph
wrote: > For CORBA interfaces do > > IMyInterface = interface > ['myintf'] >procedure DoThis (value: integer); >end; > > if delegate.GetInterface('myintf', intfDelegate) then > intfDelegate.DoThis Regards,

Re: [fpc-pascal] Dynamic messaging in Delphi

2012-07-26 Thread Ryan Joseph
> don't have reference counting built-in). That was useless code, you're right, thanks. Regards, Ryan Joseph thealchemistguild.com ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Dynamic messaging in Delphi

2012-07-26 Thread Ryan Joseph
41 AM, Ludo Brands wrote: > http://www.freepascal.org/docs-html/rtl/sysutils/supports.html > >> I'm getting an identifier not found error with the procedure >> "Supports". Where is this defined? Regards, Rya

[fpc-pascal] Loading PNG files as OpenGL textures

2015-10-10 Thread Ryan Joseph
. A small simple solution would be best if that’s possible. Thanks. Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Loading PNG files as OpenGL textures

2015-10-11 Thread Ryan Joseph
work. There is the guide I found but is there any more complete examples I could look at? Too much is missing to understand exactly how all these classes work together. http://wiki.freepascal.org/fcl-image Thanks. Regards, Ryan Joseph ___

Re: [fpc-pascal] Loading PNG files as OpenGL textures

2015-10-11 Thread Ryan Joseph
t http://www.sulaco.co.za/opengl_project_BMP_JPG_TGA_texture_loader.htm which follows a similar procedure but it’s Delphi and I couldn’t get it to run on FPC on my anyways. Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal

Re: [fpc-pascal] Loading PNG files as OpenGL textures

2015-10-11 Thread Ryan Joseph
mt_png.pas But can I then access the pixel data so I can hand it to glTexImage2D and make the texture? I think the FPC RTL classes on http://wiki.freepascal.org/fcl-image would do this also but again it’s not clear how to get the pixel data for glTexImage2D Thanks. Re

Re: [fpc-pascal] Loading PNG files as OpenGL textures

2015-10-11 Thread Ryan Joseph
es on Mac but I want to replace it with a cross platform solution that would run on Windows/Linux also that doesn’t rely on CoreGraphics libraries. I think the classes in FPimage/FPCanvas from the RTL do this already so why do we need to use CoreGraphics and Apple-only libraries? Regards,

Re: [fpc-pascal] Loading PNG files as OpenGL textures

2015-10-11 Thread Ryan Joseph
FreeMemory(bitmapData); CFRelease(colorSpace); end; end; Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Loading PNG files as OpenGL textures

2015-10-13 Thread Ryan Joseph
code the raw image data is sufficient for glTexImage2D so I wonder if the data pointer returned from BeRoPNG would work also? In my Apple CoreGraphics code I was drawing the image into a bitmap context and getting pixel data from the bitmap but that seems to be an extra step now. Regards,

Re: [fpc-pascal] Loading PNG files as OpenGL textures

2015-10-13 Thread Ryan Joseph
nuous block of memory in this class but I can’t seem to find it using the colors/pixels property. What am I missing? == http://lazarus-ccr.sourceforge.net/docs/fcl/fpimage/tfpmemoryimage.html http://lazarus-ccr.sourceforge.net/docs/fcl/fpimage/tfpcustomimage.html Rega

Re: [fpc-pascal] Loading PNG files as OpenGL textures

2015-10-13 Thread Ryan Joseph
n abstract class but TFPMemoryImage apparently has stored values so I should be able to access the “Data” property but these seem to be accessors to getting single pixel values so I can’t just pass the entire block into glTexImage2D like you did. Regards

Re: [fpc-pascal] Loading PNG files as OpenGL textures

2015-10-15 Thread Ryan Joseph
to implement also, being just a single function. Thanks. Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Loading PNG files as OpenGL textures

2015-10-15 Thread Ryan Joseph
ample at http://wiki.freepascal.org/fcl-image#Drawing_text which uses TFPMemoryImage. Thanks for the example, I’ll give this a try. Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Loading PNG files as OpenGL textures

2015-10-16 Thread Ryan Joseph
try to dig around the FPC sources to find these things? There are dozens of classes available at http://wiki.freepascal.org/fcl-image but I don’t know what any of them do. Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.f

Re: [fpc-pascal] El Capitan 10.11 installation

2015-10-22 Thread Ryan Joseph
ascal.org/cgi-bin/mailman/listinfo/fpc-pascal Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] Basic Windows tutorial

2015-10-22 Thread Ryan Joseph
where I could reference that online (.net maybe?). Sorry for being vague but I’m starting from absolute ground zero. ;) Thanks. Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin

Re: [fpc-pascal] Basic Windows tutorial

2015-10-22 Thread Ryan Joseph
> On Oct 22, 2015, at 6:07 PM, Graeme Geldenhuys > wrote: > > On 2015-10-22 05:20, Ryan Joseph wrote: >> Keeping in mind I know literally nothing about Windows programming, >> where is a good place to start? > > Start reading MSDN and study the Win32 API. Loo

Re: [fpc-pascal] Basic Windows tutorial

2015-10-22 Thread Ryan Joseph
controlpascal.com/tutorial.htm Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Basic Windows tutorial

2015-10-22 Thread Ryan Joseph
and a place I could reference the Windows headers in Pascal? > > MSDN, nowhere else despite they only have documentation for languages they > support (C++, C#, VB, perhaps F#). Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@li

Re: [fpc-pascal] Basic Windows tutorial

2015-10-22 Thread Ryan Joseph
tools so those are in the way but the biggest problem is how everything is broken up into separate windows. Could that be changed? Thanks. Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freep

Re: [fpc-pascal] Basic Windows tutorial

2015-10-23 Thread Ryan Joseph
you can use it for example > for console applications as well (like the compiler) which definitely aren't > RAD. For your purposes you'd just need to start with the correct project > template and the IDE would still assist you with its powerful codetools. &g

[fpc-pascal] FreeGLUT on Windows

2015-12-23 Thread Ryan Joseph
take the higher learning curve route and break down the OpenGLControl demo and use TOpenGLControl? Thanks. Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc

Re: [fpc-pascal] FreeGLUT on Windows

2015-12-24 Thread Ryan Joseph
S2.0, and has support for an OpenVG context if > users prefer a much easier to work with 2D API. > ___ > fpc-pascal maillist - fpc-pascal@lists.freepascal.org > http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal Regards,

Re: [fpc-pascal] FreeGLUT on Windows

2015-12-24 Thread Ryan Joseph
eeglut/bin/freeglut.dll')); Did I miss something? Thanks. Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] GLExt crashing

2016-01-28 Thread Ryan Joseph
Functions like glBlendEquation from GLExt are crashing (access violation) compiling on Mac with ppc386. The functions didn’t get loaded I think for some reason. Is this is known problem on Mac with a work around perhaps? Thanks. Regards, Ryan Joseph

Re: [fpc-pascal] GLExt crashing

2016-01-28 Thread Ryan Joseph
from /System/Library/Frameworks/OpenGL.framework/Libraries/libGL.dylib $0001000CDEF7 $0001000D0F85 > On Jan 29, 2016, at 10:40 AM, Ryan Joseph wrote: > > Does this work on OpenGLES 1.x do you know? I’m going to try this on iOS also. Regards, Ry

Re: [fpc-pascal] GLExt crashing

2016-01-28 Thread Ryan Joseph
n, *not* for OpenGLES. > For Android and iOS, use GLES20 unit. My Castle Game Engine uses this > for Android and iOS and it works cool:) Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.o

Re: [fpc-pascal] GLExt crashing

2016-01-28 Thread Ryan Joseph
> (assuming Load_GL_version_1_2 returned true) glBlendEquation will be > non-nil and will work OK. Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] GLExt crashing

2016-01-28 Thread Ryan Joseph
-2-0-ios > On Jan 29, 2016, at 11:14 AM, Michalis Kamburelis > wrote: > > Indeed, glBlendEquation is simply not available in OpenGLES 1.1. Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepas

Re: [fpc-pascal] GLExt crashing

2016-01-29 Thread Ryan Joseph
os.org/registry/gles/extensions/OES/OES_blend_subtract.txt > . If this extension is supported, you could load glBlendEquationOES > function, which should be what you need. Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal

[fpc-pascal] Android porting ideas

2016-02-20 Thread Ryan Joseph
make sense here but I’m not sure. Any ideas? Thanks. Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Android porting ideas

2016-02-21 Thread Ryan Joseph
Good idea, thanks. > On Feb 21, 2016, at 9:08 PM, leledumbo wrote: > > Learn how Castle Game Engine and ZenGL managed to do it. They don't use JVM, > but the ARM target of the compiler. Regards, Ryan Joseph ___ fpc-pascal

Re: [fpc-pascal] Android porting ideas

2016-02-21 Thread Ryan Joseph
se engines like CGE give you more comfortable API for rendering, > on top of this. So internally Android just uses the same C libraries we were using in Pascal? I guess that makes sense but I was thinking EVERYTHING on the system was now Java but that’s not the c

[fpc-pascal] Building Android cross compiler error

2016-02-22 Thread Ryan Joseph
e] Error 2 make[1]: *** [compiler_cycle] Error 2 make: *** [build-stamp.arm-android] Error 2 Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Android porting ideas

2016-02-22 Thread Ryan Joseph
makes sense but I was thinking EVERYTHING on the system was now > Java but that’s not the case I guess. The lesson here is that Android is > built on Linux so we’re sharing more than I think. This will probably make more sense when I learn about the asset manager more. I think I read there

Re: [fpc-pascal] Building Android cross compiler error

2016-02-22 Thread Ryan Joseph
ndif > #ifdef cpu386 > -Fl/home/michalis/.../android/ndk/platforms/android-19/arch-x86/usr/lib/ > #endif > #endif > > Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] TPersistent overhead

2016-03-25 Thread Ryan Joseph
, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] TPersistent overhead

2016-03-26 Thread Ryan Joseph
n Sat, 26 Mar 2016, Ryan Joseph wrote: > >> What are all the performance costs associated with subclassing TPersistent >> for RTTI information? I want to use this in some classes but >> unfortunately the way my code is written I need to basically make all my >> classes de

Re: [fpc-pascal] TPersistent overhead

2016-03-27 Thread Ryan Joseph
e the RTTI after the class definition. > > For example: > > {$M+} > TtiVisited = class(TObject) >... define your class interface here... > end; > {$M-} Regards, Ryan Joseph ___ fpc-pascal maill

[fpc-pascal] A better way?

2016-04-13 Thread Ryan Joseph
procedure DoSomething; virtual; abstract; end; “main” unit which implements the class: type TSomeClass = class (TSomeClassAbstract) procedure DoSomething; override; end; Regards, Ryan Joseph ___ fpc-pascal maillist -

Re: [fpc-pascal] A better way?

2016-04-14 Thread Ryan Joseph
method invocation and more recently interfaces to workaround. Don’t tell me this has been around for 20 years now I just never knew about it. ;) I should have asked sooner that’s for sure. Thanks! Regards, Ryan Joseph ___ fpc-pascal maillis

Re: [fpc-pascal] A better way?

2016-04-14 Thread Ryan Joseph
and always returns a reference to itself because the children // often need to know about the parent also IClassA = interface procedure ClassDidThis (parent: TClassA; action: integer); end; Regards, Ryan Joseph ___ fpc-pascal maillist

Re: [fpc-pascal] A better way?

2016-04-14 Thread Ryan Joseph
en smart to learn about Delphi and new features but I just went ahead as normal missing lots of things that would help me in future years, like today for example. :) Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.fr

Re: [fpc-pascal] A better way?

2016-04-14 Thread Ryan Joseph
lassB and it’s not exclusive to TClassA so putting them in the same unit doesn’t make sense. Maybe I’m doing something stupid but other languages have forward declarations so I wonder why Pascal isn’t doing this also since it seems like the obvious solution. Regards,

Re: [fpc-pascal] A better way?

2016-04-14 Thread Ryan Joseph
better way. However I think I like your idea of using them in conjunction with the uses in the implementation instead of my "abstract class" solution. Thanks for the tip. Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] A better way?

2016-04-14 Thread Ryan Joseph
actical and efficient solution that requires lots of extra work in design or typecasting/interfaces. Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] A better way?

2016-04-14 Thread Ryan Joseph
classes more than mixing 2 mutually exclusive classes into one unit even though they may have dependancies on each other. Editing and navigating the files would be confusing for one since there’s no obvious name to use for the file now. Regards,

Re: [fpc-pascal] A better way?

2016-04-14 Thread Ryan Joseph
ith one other unit. TClassB is communicating with TClassA via interfaces but it’s still useful standalone and distinct in nature. This happens to me all the time actually where I need to expose some type information or an interface to both classes because I don’t want them merged. Regards,

Re: [fpc-pascal] A better way?

2016-04-14 Thread Ryan Joseph
ject[HClassB]" to “TClassB" or throws an error if the identifier TClassB is not found value.DoSomething(self); end; end. Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] A better way?

2016-04-15 Thread Ryan Joseph
ting is perhaps more work but maybe I’m not getting it. Thanks. Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] A better way?

2016-04-15 Thread Ryan Joseph
pecasting ugliness. Thanks. Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] A better way?

2016-04-15 Thread Ryan Joseph
and even crashing the compiler (seg faults). Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] A better way?

2016-04-15 Thread Ryan Joseph
> On Apr 15, 2016, at 6:26 PM, Ryan Joseph wrote: > > I remember trying to doing pre-parser type things using macros but the think > the conclusion is they don’t work by just replace text like in C. > > I’m trying an example like this but getting errors and even crashing th

Re: [fpc-pascal] A better way?

2016-04-15 Thread Ryan Joseph
but it would even better if the compiler was more friendly here. If there was a good pre parser in FPC I’d just make some custom syntax but that’s not an option either as far as I know. Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pas

Re: [fpc-pascal] A better way?

2016-04-15 Thread Ryan Joseph
lassBObject: TClassB; begin result := TClassB(FClassBObject) end; procedure TClassA.SomeProc; begin aClassBObject.OtherProc; end; end. Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/c

[fpc-pascal] Cross platform mobile development

2016-09-06 Thread Ryan Joseph
could be made to work with FPC or if not something more similar than not. iOS from Free Pascal works but Java is more complicated from what I’ve been learning. Thanks. Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal

Re: [fpc-pascal] Cross platform mobile development

2016-09-07 Thread Ryan Joseph
ve iOS development in FPC so it wasn’t that useful. I think the forms do this but I haven’t found out yet. Thanks. Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Cross platform mobile development

2016-09-07 Thread Ryan Joseph
e Xamarin looks easiest because Android seems like it’s going to be hard to get working as well as iOS. Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] NSTextStorage.paragraphs

2016-09-27 Thread Ryan Joseph
-pascal@lists.freepascal.org > http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] Build script on Windows

2016-10-09 Thread Ryan Joseph
in the command prompt and this is coming from a UNIX user. ;) Thanks. Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Build script on Windows

2016-10-11 Thread Ryan Joseph
lf but I’m struggling trying to figure out the command prompt program. Copy and paste should be easier than this. Is there another terminal that Windows users like? I really don’t understand why you can’t just paste or select text like you would in any other terminal. Regards

[fpc-pascal] C translation question

2016-10-22 Thread Ryan Joseph
.y - self[i].y) / (self[j].y - self[i].y) + self[i].x) then c := not c; end; result := c <> 0; end; Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org ht

Re: [fpc-pascal] C translation question

2016-10-22 Thread Ryan Joseph
it requires an explanation makes my worry about how easy it is to mess up. :) Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] C translation question

2016-10-24 Thread Ryan Joseph
]) + vertx [i])) > c = !c; > > j = i; >i = i + 1; > } > > return c; > } Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] Interface performance

2016-11-10 Thread Ryan Joseph
for high performance situations. Is there a better way to do this or should I not use interfaces like this in FPC? Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman

Re: [fpc-pascal] Interface performance

2016-11-11 Thread Ryan Joseph
the purpose of this is and why it’s even useful. > On Nov 10, 2016, at 6:45 PM, Ryan Joseph wrote: > > Some times when I want to communicate with a class I don’t have full scope > access to I’ll use interfaces and the Supports function to call a method. > I’ve noticed however

Re: [fpc-pascal] Interface performance

2016-11-11 Thread Ryan Joseph
lly is. In my first test this didn’t happen and I was able to use an interface as a type then cast it to an object, pass to a function and call a method. In the 2nd example the variable went from a couple classes first and died at the end. Seems very unstable. Regards, Ryan Joseph

Re: [fpc-pascal] Interface performance

2016-11-11 Thread Ryan Joseph
I ditch CORBA in favor or COM? Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Interface performance

2016-11-11 Thread Ryan Joseph
ases (but better than my previous solution using Supports for all access). I’m trying your code example now and I get "Class or COM interface type expected, but got “IMyInterface”” when I try to cast with “as”. I was using {$interfaces corba} so maybe that’s the problem? R

Re: [fpc-pascal] Interface performance

2016-11-11 Thread Ryan Joseph
to do just > that (generate smaller GUID values of about 6 characters long). I’m not sure all Supports does but I didn’t test shorter strings yet. I think it does more than just compare strings though. Maybe I’ll try that later thanks. Regards, Ryan Joseph ___

Re: [fpc-pascal] Interface performance

2016-11-11 Thread Ryan Joseph
I’m getting suggest memory is being trashed by the compiler at some point without my knowledge. I never explicitly allocate an interface like an object so there’s nothing to manage in my mind. Regards, Ryan Joseph ___ fpc-pasc

Re: [fpc-pascal] Interface performance

2016-11-11 Thread Ryan Joseph
ct1 := TMyObjectClass.Create; MyInterface := MyObject1; MyInterface.MyProc; MyObject2 := TMyObjectClass(MyInterface); MyObject1.Free {OK for CORBA - will cause an exception in COM} {MyObject1, MyObject2 and MyInterface are now all invalid} end; Regards, Ryan Joseph

Re: [fpc-pascal] Interface performance

2016-11-11 Thread Ryan Joseph
ly not a good solution. More on this tomorrow until I give up for certain. :) Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Interface performance

2016-11-11 Thread Ryan Joseph
here and it defeats the purpose ObjInt := Arr.GetObject(0) as IMyInterface; Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Interface performance

2016-11-12 Thread Ryan Joseph
an up the problem further but I need to adapt more code to make that work easily and removing the constant Support calls is good enough to put my mind at ease. :) Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal

[fpc-pascal] For..in enumerator for generic records?

2016-11-29 Thread Ryan Joseph
I have a generic record I would like to enumerate using for..in loops. Is this even possible? I tried briefly and it wasn’t clear this was possible so I thought I’d ask first. Thanks. Regards, Ryan Joseph ___ fpc-pascal maillist - fpc

Re: [fpc-pascal] For..in enumerator for generic records?

2016-11-30 Thread Ryan Joseph
yan Joseph wrote: > > There’s a class nested inside a class?? I never saw that before. What are all > the inlines for btw? Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal

Re: [fpc-pascal] For..in enumerator for generic records?

2016-11-30 Thread Ryan Joseph
There’s a class nested inside a class?? I never saw that before. What are all the inlines for btw? > On Nov 30, 2016, at 3:09 PM, Sven Barth wrote: > > Take a look at packages/fcl-stl/src/gvector.pp, it's a generic vector > container that provides an enumerator. > >

Re: [fpc-pascal] For..in enumerator for generic records?

2016-11-30 Thread Ryan Joseph
I want it to be stored on the stack. It’s trivial to just enumerate the array inside the record but I wanted to try the more elegant solution of making an enumerator for the record. Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@

Re: [fpc-pascal] For..in enumerator for generic records?

2016-11-30 Thread Ryan Joseph
> On Nov 30, 2016, at 6:22 PM, Marco van de Voort wrote: > > * (for..in) Enumerators in records Where’s an example of this? I’m trying it with a generic record and I can’t it to compile so I’m not sure if this is supported or not. Regards, Ry

Re: [fpc-pascal] For..in enumerator for generic records?

2016-11-30 Thread Ryan Joseph
s I just learned but nested classes feel messy. Is there at least some namespace protection? That would be a benefit I suppose if the class was only ever used inside that class but a unit may be a better option in that case. Regards, Ryan Joseph ___

Re: [fpc-pascal] For..in enumerator for generic records?

2016-12-01 Thread Ryan Joseph
Yes but the problem is doing this with generics. :) That’s where I got stuck and I don’t think it’s possible. > On Dec 2, 2016, at 4:58 AM, Sven Barth wrote: > > I've attached an example that shows how this *can* be done (it's not the > only way to do this however).

[fpc-pascal] Untyped var params

2017-01-04 Thread Ryan Joseph
. Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Untyped var params

2017-01-04 Thread Ryan Joseph
nd return it back to the caller? In your example how could I return 5 to “i” inside GetSomething? Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Untyped var params

2017-01-07 Thread Ryan Joseph
like I was planning. Thanks for helping. Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Untyped var params

2017-01-08 Thread Ryan Joseph
obj.Retain; end else obj := nil; TObjectPtr(io)^ := obj; // crashes here end; var foo: TMyObject; something: TMyObject; foo := TMyObject.Create; RetainObject(something,

[fpc-pascal] C# translatation

2017-01-08 Thread Ryan Joseph
tly? if h < 8 then u := x else u := y; double u = h < 8 /* 0b1000 */ ? x : y; Thanks for helping. Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Untyped var params

2017-01-08 Thread Ryan Joseph
> On Jan 8, 2017, at 5:36 PM, Ryan Joseph wrote: > > Casting TObject(input) := obj; worked but the value of “io” is still not > getting set. Because it’s a var I expected the value to be returned to the > caller. Never mind, I got it working, stupid mistake in my testing.

Re: [fpc-pascal] Untyped var params

2017-01-08 Thread Ryan Joseph
would take the time to learn Free Pascal more since it always pays off in the end. Casting TObject(input) := obj; worked but the value of “io” is still not getting set. Because it’s a var I expected the value to be returned to the caller. Regards, Ryan Joseph _

Re: [fpc-pascal] C# translatation

2017-01-08 Thread Ryan Joseph
++) { p[x] = permutation[x%256]; } } Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] C# translatation

2017-01-08 Thread Ryan Joseph
x := x mod repeatValue; y := y mod repeatValue; z := z mod repeatValue; end; Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] C# translatation

2017-01-08 Thread Ryan Joseph
> On Jan 8, 2017, at 6:55 PM, Ryan Joseph wrote: > > why am I getting this error? Operator is not overloaded: "Double" mod > “LongInt”. Mod can’t be used with double and integers like in C? Sorry for the repeat. Same error here but "Operator is not overloaded:

Re: [fpc-pascal] C# translatation

2017-01-08 Thread Ryan Joseph
und even. http://www.freepascal.org/docs-html/rtl/math/index-5.html doesn’t show this function exists either. I thought (int)x was just type casting and didn’t actually transform the number. That’s confusing. Regards, Ryan Joseph ___ fpc-pascal m

[fpc-pascal] Drawing bitmap by pixel

2017-01-19 Thread Ryan Joseph
I’d like to draw a bitmap pixel by pixel then save to disk but I can’t understand the docs available online. I know there’s a BGRABitmap class with direct pixel access but I wasn’t able to find the unit in my FPC distribution.I used the image canvas before to draw bitmap fonts so I have this code w

Re: [fpc-pascal] Drawing bitmap by pixel

2017-01-19 Thread Ryan Joseph
> On Jan 20, 2017, at 8:31 AM, Ryan Joseph wrote: > > Thanks guys, > > Here’s the new program based on your example but it still just outputs a pure > black image. never mind! The max color value is 65535. I thought it was 1.0 or 255. Got it working now. Thanks again. Reg

Re: [fpc-pascal] Drawing bitmap by pixel

2017-01-19 Thread Ryan Joseph
for x := 0 to image.Width-1 do for y := 0 to image.Height-1 do image.Colors[x, y] := FPColor(255, 0, 0, 255); writer := TFPWriterPNG.Create; writer.Indexed := False; image.SaveToFile('bitmap.png', writer); end;

[fpc-pascal] Pointer hashing

2017-01-29 Thread Ryan Joseph
x := Power((x shr 16), x); result := x; end; Thanks for any ideas you have. Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

  1   2   3   4   5   6   7   8   9   10   >