• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
subclass of a class written in ASOC
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

subclass of a class written in ASOC


  • Subject: subclass of a class written in ASOC
  • From: Thomas Straus <email@hidden>
  • Date: Wed, 19 Jan 2011 15:20:39 +0100

Hello list,

has anybody tried to write a subclass of an own ASOC class? I'm trying to do that, and I can't get inheritance of methods to work. What am I misunderstanding, where is my mistake, or where is eventually the bug...?

The situation is the following:

I have a class written in ASOC that looks like

> script class1
> 	property parent : class "NSObject"
>
> 	on init()
> 		log "Init class1"
> 		return me
> 	end init
>

the class has a method (init in this case, but it can be whatever). Then I make a subclass out of it like

> script class1subclass
> 	property parent : class "class1"

But unless I have the method explicitly defined in the subclass, the method isn't inherited from the ASOC superclass, i.e.

> 	property class1 : class "class1"
> 	property class1subclass : class "class1subclass"
>
>
> 		set test to class1subclass's alloc()'s init()

causes an exception on an unknown method "init" of the subclass

Any thoughts?

Thanks,

Thomas _______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: subclass of a class written in ASOC
      • From: Dave <email@hidden>
  • Prev by Date: Re: Windows - orderFront_(me) - How do I change focus to the window bought forward?
  • Next by Date: Re: subclass of a class written in ASOC
  • Previous by thread: Re: Windows - orderFront_(me) - How do I change focus to the window bought forward?
  • Next by thread: Re: subclass of a class written in ASOC
  • Index(es):
    • Date
    • Thread