UA-17470720-3

Jump to content


Photo
- - - - -

Parse: unrecognized selector sent to class


  • Please log in to reply
6 replies to this topic

#1 Patrick Bovens

Patrick Bovens

    Jr. Member

  • STV 5.0 Pro
  • PipPip
  • 14 posts
Reputation: 3
Good

Posted 01 March 2015 - 02:27 PM

Hi all,

 

I'm using STV 4.1.2 and am trying to code my way through managing a Parse class called 'Channels'. Problem with the code below is that I'm getting an error:

 

+[SCArrayOfObjectsSection sectionWithHeaderTitle:parseDefinition:]: unrecognized selector sent to class

 

while trying to create a SCArrrayOfObjectsSection using the code below:

 

  SCParseDefinition *channelDef = [SCParseDefinition definitionWithClassName:@"Channel" columnNamesString:@"name" applicationId:@"<applicationId>" clientKey:@"<clientId>"];

    SCPropertyDefinition *namePDef = [channelDef propertyDefinitionWithName:@"name"];

    namePDef.type = SCPropertyTypeTextView;

    SCArrayOfObjectsSection *channelSection = [SCArrayOfObjectsSection sectionWithHeaderTitle:@"Channels" parseDefinition:channelDef];

    channelSection.addButtonItem = self.addButton;

    [self.tableViewModel addSection: channelSection];

 

Things work great when using storyboards but was hoping to use 'good old code' but can't figure why this call fails. What am I missing here?

 

Kind regards,

 

Patrick



#2 Patrick Bovens

Patrick Bovens

    Jr. Member

  • STV 5.0 Pro
  • PipPip
  • 14 posts
Reputation: 3
Good

Posted 01 March 2015 - 11:46 PM

I added sources and could no longer reproduce; things just run fine now. 

 

Patrick



#3 Tarek

Tarek

    Forum Admin

  • Administrators
  • 3670 posts
Reputation: 452
Popular

Posted 02 March 2015 - 08:44 AM

Hi Patrick,

 

The above error just probably means that you did not add the STVParse framework. Did you create your project using the STV Parse Xcode template? (if you're not sure what that is, please refer to our STV Parse tutorial)



#4 Patrick Bovens

Patrick Bovens

    Jr. Member

  • STV 5.0 Pro
  • PipPip
  • 14 posts
Reputation: 3
Good

Posted 08 March 2015 - 03:13 AM

Hi Tarek,

 

Still not sure what caused this as the STVParse framework was added (double-checked) when I got this error. Wasn't using the template as I'm on an existing project. 

 

Kind regards,

 

Patrick



#5 ozie

ozie

    ¯\_(ツ)_/¯

  • STV 5.0 Pro
  • PipPipPipPipPipPipPip
  • 526 posts
  • LocationAustralia
Reputation: 169
Popular

Posted 08 March 2015 - 07:17 PM

i came across the exact same type of error yesterday.. i swapped out v3.3 for v4.1 of STV and using web definition 

SCArrayOfObjectsSection *Objsection = [SCArrayOfObjectsSection sectionWithHeaderTitle:nil webDefinition:webDef];

 

+[SCArrayOfObjectsSection sectionWithHeaderTitle:webDefinition:]: unrecognized selector sent to class

 

i ended up just puting v3.3 back in :)


P.S. I hate Swift.. don't talk Swift.. Too old school to learn yet another programming language.


#6 Tarek

Tarek

    Forum Admin

  • Administrators
  • 3670 posts
Reputation: 452
Popular

Posted 09 March 2015 - 07:31 AM

Hi ozie,

 

You actually have a typo in your method. It should be sectionWithHeaderTitle:webServiceDefinition:, and not 'webDefinition'.



#7 ozie

ozie

    ¯\_(ツ)_/¯

  • STV 5.0 Pro
  • PipPipPipPipPipPipPip
  • 526 posts
  • LocationAustralia
Reputation: 169
Popular

Posted 09 March 2015 - 12:59 PM

Sorry Tarek.. i was being sneaky using copy&paste to be quick.. i just checked and my code was correct

SCArrayOfObjectsSection *webSection = [SCArrayOfObjectsSection sectionWithHeaderTitle:nil webServiceDefinition:webDef];

this was the line that it didnt like.. even after a complete clean etc.. 


P.S. I hate Swift.. don't talk Swift.. Too old school to learn yet another programming language.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users