On Jan 15, 2009, at 10:27 AM, Mohan Parthasarathy wrote:
I have tried this to make sure that the class is loaded, but not
working:
[[NSBundle mainBundle] classNamed:clsName];
[self loadBundleForClass:clsName];
Class cls = NSClassFromString(clsName);
I still get nil.. What am i missing ?
You
Hi,
Thanks a bunch.. It really helped me to debug the problem.
-mohan
On Thu, Jan 15, 2009 at 10:48 AM, Andy Lee wrote:
> Unless you're explicitly loading in bundles or plugins, I wouldn't think
> you need to force the class to be loaded. I just tested a call to
> NSClassFromString(nameOfTes
Hi,
I have tried this to make sure that the class is loaded, but not working:
[[NSBundle mainBundle] classNamed:clsName];
[self loadBundleForClass:clsName];
Class cls = NSClassFromString(clsName);
I still get nil.. What am i missing ?
thanks
mohan
On Thu, Jan 15, 2009 at 9:17 AM, Mohan Part
Unless you're explicitly loading in bundles or plugins, I wouldn't
think you need to force the class to be loaded. I just tested a call
to NSClassFromString(nameOfTestClass) as the first line of my main()
function and it worked.
In situations like this I try to question my most petty assum
Both of the methods return nil and as per the document it says "Class is not
loaded". Is there a compile time option to load the classes or only way to
do it as at runtime..
thanks
mohan
On Wed, Jan 14, 2009 at 6:46 AM, Adam Venturella wrote:
> The output is the same, but there is also:
> #impo
The output is the same, but there is also:
#import
objc_getClass([myString UTF8String]);
I am going to guess that NSClassFromString(myString) is probably using
objc_getClass(), maybe not. I didn't know NSClassFromString existed
though, so I am switching to that instead of using the runtime.h
fun
On Tue, Jan 13, 2009 at 8:06 PM, Ken Thomases wrote:
> On Jan 13, 2009, at 3:33 PM, Jean-Daniel Dupas wrote:
>
> he is just talking about class name, not class.
>>
>> NSClassFromString() is probably what you're looking for.
>>
>> NSMutableString *clsName = derive class name from the entry.
>>
>>
On Jan 13, 2009, at 3:33 PM, Jean-Daniel Dupas wrote:
he is just talking about class name, not class.
NSClassFromString() is probably what you're looking for.
NSMutableString *clsName = derive class name from the entry.
Class cls = NSClassFromString(clsName);
id instance = [[cls alloc] init]
thanks, this is exactly what i was looking for..
thanks
mohan
On Tue, Jan 13, 2009 at 1:41 PM, Bill Bumgarner wrote:
> On Jan 13, 2009, at 1:33 PM, Jean-Daniel Dupas wrote:
>
>> he is just talking about class name, not class.
>>
>> NSClassFromString() is probably what you're looking for.
>>
>>
On Jan 13, 2009, at 1:33 PM, Jean-Daniel Dupas wrote:
he is just talking about class name, not class.
NSClassFromString() is probably what you're looking for.
NSMutableString *clsName = derive class name from the entry.
Class cls = NSClassFromString(clsName);
id instance = [[cls alloc] init];
Le 13 janv. 09 à 22:29, Bill Bumgarner a écrit :
On Jan 13, 2009, at 1:18 PM, Mohan Parthasarathy wrote:
Does this make sense ?
Yes.
Or this is a bad idea ?
Yes.
Generally, anyway, it is indicative of bad design when your code
seems to require dynamic generation of classes.
he is
On Jan 13, 2009, at 1:18 PM, Mohan Parthasarathy wrote:
Does this make sense ?
Yes.
Or this is a bad idea ?
Yes.
Generally, anyway, it is indicative of bad design when your code seems
to require dynamic generation of classes.
Not to say that there aren't specific cases where it is warr
Hi,
Sorry for the bad subject name. I found no other way to explain this. What i
need is a way to generate a class name dynamically. For example, the user
selects an entry in the Table (assume just one column) and each entry is
handled by a separate class. Obviously, i can have a dictionary which
13 matches
Mail list logo