UA-17470720-3

Jump to content


Photo
- - - - -

Sample Code requested...


  • Please log in to reply
27 replies to this topic

#21 David DelMonte

David DelMonte

    Forum Master

  • STV 4.0 Pro
  • PipPipPipPipPipPipPip
  • 527 posts
Reputation: 41
Excellent

Posted 11 May 2011 - 11:57 AM

[quote]@David: 1. When I perform a search, I click search but the keyboard is not released. [/quote]

We've actually left this without a default action and left it for the developer to decide what to do depending on their own desired application behavior. To dismiss the keyboard, just implement the SCTableViewModelDelegate method called "tableViewModelSearchBarSearchButtonclicked:" and call [tableViewModel.searchBar resignFirstResponder].
[/quote]

ok that's fine.

[quote] I am guessing that we could easily make it work with STV if we subclass it into a new SCSearchDisplayController for example. I think UISearchDisplayController provides a lot of really cool visual cues, and if I am right about the subclassing theory, then we should probably have SCSearchDisplayController ready for STV 2.1. How urgent do you need this David?
[/quote]

No rush Tarek, later today would be fine :)

Seriously, I can live with this until 2.1. (We won't lose our databases (?) - I want to deploy this app soon)

[quote]I wish everyone would chip into these discussions, unless Tarek wishes otherwise.

I would actually LOVE to!! [/quote]

Great!!! Thanks for helping the noob as usual Tarek..

(Whatever happened to COBOL?)

#22 carl grainger

carl grainger

    Sr. Member

  • STV 3.0 Pro
  • PipPipPip
  • 44 posts
Reputation: 3
Good

Posted 11 May 2011 - 02:57 PM

Hi all,

I'm just wondering if this behaviour is normal or if I'm screwing things up as usual;

If the searchBar has text, the scopeBar becomes ineffective.

The scopeBar looks and behaves as normal and the delegate method searchBarSelectedScopeButtonIndexDidChange fires BUT the tableView remains as was.

I'm new to scopeBar and not sure if it's OK to use it before during and after using the searchBar. However on seeing this behaviour my first thought was to have the scopeBar disabled when the searchBar has text.

Appreciate your wisdom on this..

Carl

#23 David DelMonte

David DelMonte

    Forum Master

  • STV 4.0 Pro
  • PipPipPipPipPipPipPip
  • 527 posts
Reputation: 41
Excellent

Posted 11 May 2011 - 03:14 PM

Carl, I'm at the airport. I will check what happens to my app between flights.

David
  • Roberto Montesinos likes this

#24 Tarek

Tarek

    Forum Admin

  • Administrators
  • 3670 posts
Reputation: 452
Popular

Posted 11 May 2011 - 08:04 PM

Hi Carl,

Thank you very much for reporting this! We have replicated your code and there seems to be a bug with reloadBoundValues ignoring whatever search value is present in the searchBar. We'll fix this in our next release. Thanks again!

#25 carl grainger

carl grainger

    Sr. Member

  • STV 3.0 Pro
  • PipPipPip
  • 44 posts
Reputation: 3
Good

Posted 11 May 2011 - 08:16 PM

You're welcome. I wouldn't have guessed it was a bug, but it's great to know you guys are already on the case.
Cheers

#26 David DelMonte

David DelMonte

    Forum Master

  • STV 4.0 Pro
  • PipPipPipPipPipPipPip
  • 527 posts
Reputation: 41
Excellent

Posted 25 May 2011 - 04:06 PM

Tarek, I should have said thanks before.. Been without the net for a week and just catching up..
I have search and scope working great now.

One more thing :)

I have a single search term called frontWord. Is it possible to add a second term called "backWord"?

One other more thing :)

Is it possible to search in non-english languages (greek, arabic, etc)?

David

#27 Tarek

Tarek

    Forum Admin

  • Administrators
  • 3670 posts
Reputation: 452
Popular

Posted 26 May 2011 - 10:21 PM

Hi David,

You're welcome, never mind at all :)

I have a single search term called frontWord. Is it possible to add a second term called "backWord"?


If I understand you correctly, "frontWord" and "backWord" are attribute names, right? If so, then yes, just place the attribute names separated by semi-colons in your SCArrayOfObjectsModel property called searchPropertyName. For example:
myArrayOfObjectsModel.searchPropertyName = @"frontWord;backWord";

Is it possible to search in non-english languages (greek, arabic, etc)?


We actually haven't tried this before. Are you having any problems searching with non-latin alphabets?

#28 David DelMonte

David DelMonte

    Forum Master

  • STV 4.0 Pro
  • PipPipPipPipPipPipPip
  • 527 posts
Reputation: 41
Excellent

Posted 27 May 2011 - 12:30 AM

Thanks Tarek!

tableModel.searchPropertyName = @"frontWord;backWord";

works perfectly.

And, search CAN find a word in a foreign key - well, at least Greek and Russian. I haven't activated Arabic, Hebrew or any Asian languages yet.

David
  • David DelMonte likes this




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users