@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14



Comments:

<0> ie : if (Ages["Bob"] > 20) then bleh
<1> delphi doesn't support ***ociative arrays
<1> thats generally for interpretive langauges
<1> perl made that popular
<0> hmm
<0> yeah i got real used to it in php
<0> handy stuff but always made me feel like i was cutting some corners programming wise
<0> know of any way to extend that functionality into delphi?
<0> it'd help a lot for one part i'm doing here
<0> bleh i guess i could just write the routines
<2> YourTSTringList.Values['blah']
<2> but that's not necesserally fast
<1> THashedStringList might work though
<0> thats ok though it wouldnt really have to be
<1> but you can only do string to string
<0> i jsut need to use strings to process the scene file into a more standardized format



<0> hmm
<0> yeah those are both good ideas that'd prolly work for wha ti want to do
<0> thanks :)
<1> it might be better for you to say, store in a hash list, then load from said hash list
<1> rather than use RTTI
<0> yeah maybe
<1> it would generally be faster too
<0> yeah and once i gotten my parameters and properties and stuff converted over from english/string to int-constant indexed arrays it'll go faster too
<0> it'll only need to look at the scene in english the first time through
<0> and then some more so with event scripts i suppose
<0> but that'll be compartively minimal
<0> its tempting to try to make some sort of totally hackable mmorpg environment out of the idea
<0> but i suppose SL has a pretty wide lead on that idea
<1> what?
<0> well this thing i'm making is a descriptor file for 3d environments
<0> and by design it'll be editable during runtime
<1> ahhh
<0> not just shape and color for that matter but function and low down nitty gritty
<1> you should talk to LordCrc, hes by done by far way more stuff like that
<0> if it goes the way a similar experiment did with php/mysql, i'll end up building much of the environment inside the environment
<0> right on
<0> yeah i dont even know what to do with the idea yet
<0> aside from some kinda simplistic 1 player game ideas
<1> icky
<0> seems like you could do some neat stuff with it though
<1> who?
<0> who how?
<0> eh?
<1> you who?
<0> just some guy
<1> k
<0> not trying to be intentionally vague either
<0> i'm just no one in particular
<1> if you say so
<0> mow lawns for a living these days
<0> dig ditches, etc
<1> some people need day jobs
<0> it helps fo rme to do that kind of work instead of computer stuff
<0> otherwise i get home and i have no energy for my projects
<0> this way i can think about whatever i'm working on all day, then come home and act on whatever i've figured out during the day.. so i dont mind it much, but its not fancy
<1> k
<0> looks like get/setprop want work with windows, expecting hwnd parameters etc.... the objects i'm working with arent gui in nature, could i give them a hwnd parameter anyways to use with get/setprop ?
<0> or would that be a lame ****around?
<1> donno, don't use it
<1> never needed RTTI
<0> looks like setprop would just about be perfect for what i'm wanting to do
<0> if only it was like: blah.SetProp()
<1> i just create a LoadFromStream or LoadFromFile, function for the object
<0> maybe i'll figuroe ut a way. thanks
<0> hmm
<0> as in you load up serialized data?
<0> or ?
<1> well, if i have it in XML, then i just p*** it the data via xml, and it loads it itself, without needing to use RTTI
<1> i mean, the object knows its own properties without having to use RTTI
<0> interesting
<0> maybe i'm m***ively overcomplicating
<1> lol
<0> wouldnt be the first time
<1> most objects in delphi have a LoadFromStream and LoadFromFile function
<1> just keeping with the rest of the sanity
<0> what do the objects textfile's end up looking like?



<0> xml?
<0> trying to keep something pretty sane looking for an enduser to muck around with
<1> it can look like anything you want it to
<0> so i've adopted a sorta bastardzied html / javascript sort of format
<1> i mean, for TBitmap objects, the LoadFromFile is a bmp
<1> so why can TYourObject, have a LoadFromFile, thats an XML document
<0> what about the tbitmaps other non-image parameters?
<0> hmm thats true
<1> like?
<0> left/top, name, visible, sizeconstraints, etc
<1> TBitmap doesn't care about that since they aren't a component
<1> but
<0> ohhh right right my bad
<0> i'm think of panels and ****
<0> thinking even
<1> you could make a wrapper for it, that read from a file that DID care
<0> i guess what i'm trying to avoid with the RTTI or similar is a m***ive case statement
<0> i see it looming over my horizon
<0> i'm trying to dodge it
<1> just load the xml in the LoadFromStream, and then set the properties in order, bam, all done
<0> hmm
<0> well if the data was all uniformly presented you could avoid that case statement
<0> i guess thats true
<1> you wouldn't even need a case for a LoadFromStream
<0> definately something to consider
<1> just a list of
<1> Self.Property1 := FromXml1;
<1> Self.Property2 := FromXml2;
<0> yeah that might be a little more strict than i was planning on being at first...
<0> but
<0> i was eventually ocnsidering making something to sorta wysiwyg these files together
<0> i could have it save off a sort of preparsed version of the scene file
<1> i don't see why it matters, its not like a non programmer would be able to add features you haven't coded anyway
<0> in the fashion your describing
<0> but they could
<1> how so?
<0> well
<0> not a non programmer
<0> but novice programmers could
<0> by attaching code to different events
<1> they still would have to have your source
<0> no i could create a basic collection of routines for them to work with
<0> and let them script the implementation of those functions
<0> for instance this web thing i made way back
<1> so have a trap all then, "if i don't use this xml property, send an event for it"
<0> had one major big ole function i hard coded: 'GetContent(id);'
<0> which would retrieve mysql content, parse it, and output its output
<1> mysql for a game, how scary ;-)
<0> just scripting that one command you can do all kinds of cool stuff
<0> haha yeah
<0> i got some kinda nutty ideas in mind
<1> i guess
<0> but i wasnt seriously consideirng mysql for a game
<0> this was for a cms
<1> cms?
<0> content management system
<0> like postnuke etc
<1> cheap things
<0> yeah i guess but they can make money
<0> cause of how well they let you isolate textual/image content from form/function of the website
<1> maybe, until the fad wears off
<0> so you can plug idiots into to their websites to update them without needing to worry about them borking your code
<1> they are such a PITA to add new content, and it mostly breaks things you never knew it would
<0> not mine
<0> its easy
<0> but i'm a fascist when it comes to user access
<0> i allow msyelf total access, but end users get access to only **** they can work with
<0> keeps things much more sane for them
<1> one day i hope php grows into a useful language
<0> yeah me too
<0> sure is fun
<0> you can code it with your toes, blindfolded :)
<0> i think it reads easier than a lot of pseudocode i've read
<1> i generally use a key/lock system for my access rights, its much more sane


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #delphi
or
Go to some related logs:

largest yatch microsoft
bokaburgers
#visualbasic
#italy
#3dsmax
#politics
gwgo cmkx connection
#winvista
#computers
#red



Home  |  disclaimer  |  contact  |  submit quotes