UA-17470720-3

Jump to content


Photo
- - - - -

Syntax for "Predicate String" in an Array of Objects section


  • Please log in to reply
2 replies to this topic

#1 Wes Baird

Wes Baird

    Having Fun

  • STV 5.0 Pro
  • PipPip
  • 20 posts
  • LocationGreat White North
Reputation: 1
Good

Posted 02 December 2014 - 12:37 PM

Hi,

 

I am trying to use a simple predicate in IB for STV.  What I want is to display entities where the "completed" attribute (a boolean) is set to NO.

If I was doing this directly in code, I would use something like: 

 

@"completed == %@", [NSNumber  numberWithBool:NO]]

 

 

thx,

wes

 

 

Figured out... turns out it is easier than I was making it.

The correct predicate string is:   completed = 0

 

Very simple and what I should have expected from STV to being with.

Also, I have attached the basic before/after pictures that illustrate this.

 


Attached File  PredicateDefault.png   28.6K   1 downloadsAttached File  PredicateWorking.png   27.84K   1 downloads


Edited by Wes Baird, 03 December 2014 - 03:56 AM.


#2 TODD GARLAND

TODD GARLAND

    Experienced Member

  • STV 4.0 Pro
  • PipPipPipPip
  • 69 posts
Reputation: 21
Excellent

Posted 03 December 2014 - 01:54 PM

This is great feature. Does anyone know format for strings etc.

 

For example, name = joe. Tried with quotes, unsuccessful.

 

Thanks



#3 Morten Jacobsen

Morten Jacobsen

    Experienced Member

  • STV 5.0 Pro
  • PipPipPipPip
  • 52 posts
Reputation: 10
Good

Posted 29 December 2015 - 10:58 AM

name = "joe"

 

name = joe -> should give an explicit error in Xcode as of now.

 

You may have to restart Xcode and rebuild in order to see the result.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users